﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using NGourd.Core.Runners;

namespace NGourd.CLI
{
    class AddFeatureFileToConfigurationTweak : IConfigurationTweak
    {
        private readonly FileInfo fileInfo;

        public AddFeatureFileToConfigurationTweak(string fileName)
        {
            fileInfo = new FileInfo(fileName);
            if (fileInfo.Exists == false)
            {
                Console.WriteLine("Couldn't find: {0}", fileInfo.FullName);
                Environment.Exit(-2);
            }
        }

        public void ApplyTo(Configuration config)
        {
            config.FeatureFiles.Add(fileInfo);
        }
    }
}
